package com.erp.gather.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.erp.gather.domain.vo.ErpCollectProductVo;
import com.ruoyi.common.core.annotation.DataColumn;
import com.ruoyi.common.core.annotation.DataPermission;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.gather.api.domain.ErpCollectProduct;
import com.ruoyi.gather.api.domain.dto.AutoQueryInfoDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 采集商品;参考AE-商品：发布产品信息（aliexpress.postproduct.redefining.postaeproduct）Mapper接口
 *
 * @author erp
 * @date 2023-03-07
 */
public interface ErpCollectProductMapper
        extends BaseMapperPlus<ErpCollectProductMapper, ErpCollectProduct, ErpCollectProductVo> {
    @Override
    @DataPermission({@DataColumn(key = "userName", value = "collect_user_id")})
    <P extends IPage<ErpCollectProduct>> P selectPage(P page,
                                                      @Param(Constants.WRAPPER) Wrapper<ErpCollectProduct> queryWrapper);

    String getCategoryEn(@Param("id") Long collectProductId);

    String getCategoryCN(@Param("id") Long collectProductId);


    List<ErpCollectProduct> queryCollectProductIdList();

    List<ErpCollectProduct> queryCollectProductIdListByUserId(@Param("userId") Long userId);

    List<String> selectCollectProductListForAuto(@Param("dto") AutoQueryInfoDto dto);

    ErpCollectProduct selectCategoryByWhiteNull();

    List<String> selectCollectProductListForAutoTemproary(@Param("dto")AutoQueryInfoDto dto);

    List<String> selectCollectProductListForAutoTemproaryByUnshelf(@Param("dto")AutoQueryInfoDto dto);
}
